<script setup>
import { ref, watch } from 'vue'
import cmpnts from "pkgs/cmpnts"
import { store, func } from "pkgs/stores"

console.log(cmpnts)
console.log(store)

func.setPage(cmpnts.pages.BlankPage.clone())
window.document.title = store.page.name

func.addCmpnt(cmpnts.containers.Form.clone())

let input = cmpnts.widgets.Input.clone()
input.props.style.width = "120px"
input.props.valueKey = "name"
input.valueKey = "name"

let xswitch = cmpnts.widgets.Switch.clone()
xswitch.valueKey = "switch"

const menus = [{
  label: '数据库',
  icon: 'iconfont te-i-database',
  divided: true,
  children: [
    {
      label: '用户信息',
    },

  ]

}, {
  label: '显示标签',
  icon: 'iconfont te-i-shouye',
  cmpnt: cmpnts.widgets.Switch.clone(),
}, {
  label: '标签后缀',
  icon: 'iconfont te-i-shouye',
  cmpnt: input,
},]
const data = ref({})

</script>

<template>
  <div class="h-100 w-100 pt-4 ps-3">
    <x-cmpnt-render :cmpnt="store.page" :data="data"></x-cmpnt-render>
    <x-drop-menu :menus="menus" :props="{ title: 'label' }">
      <i class="iconfont te-i-add"></i>
    </x-drop-menu>
  </div>



</template>
